///<reference path="progress/apes-progress.module.ts"/>
import { ModuleWithProviders, NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';
import { ApesEmptyModule } from '@shared/apes/empty';
import { ApesIconModule } from '@shared/apes/icon';

/* 图表控件（charts） */
import { ApesG2BarModule } from '@shared/charts/bar';
import { ApesG2PieModule } from '@shared/charts/pie';
import { ApesChartsModule } from '@shared/apes-charts';

/* 会话控件（dialog） */
import { ApesModalModule } from './modal';

/* 异常控件（exception） */
import { ApesExceptionModule } from './exception';

/* 表单控件（form） */
import { ApesAutoCompleteModule } from './auto-complete';
import { ApesButtonModule } from './button';
import { ApesCheckboxModule } from './checkbox';
import { ApesCityPickerModule } from './city-picker';
import { ApesInputModule } from './input';
import { ApesInputNumberModule } from './input-number';
import { NgSelectModule } from './ng-select';
import { ApesRadioModule } from './radio';
import { TreeModule } from './tree-display';
import { ApesTreeModule } from './tree';
import { ApesTreeSelectModule } from './tree-select';
import { ApesButtonListModule } from './button-list';
import { ApesSpanModule } from './span';
import { ApesDatePickerModule } from './date-picker';
import { ApesTimePickerModule } from './time-picker';
import { ApesUploadModule } from './upload';
import { ApesTimelineModule } from './timeline';
import { ApesSwitchModule } from './switch';
import { ApesSelectModule } from './select';
import { ApesWaveModule } from './core';
import { ApesDescriptionsModule } from './descriptions';
import { ApesCustomCardModule } from './custom-card';


/* 布局控件（layout） */
import { ApesCardModule } from './card';
import { ApesContainerModule } from './container';
import { ApesGlobalFooterModule } from './global-footer';
import { ApesHeaderModule } from './header';
import { ApesContentModule } from './content';
import { ApesTabsModule } from './tabs';
import { ApesGridModule } from './grid';
import { ApesFormModule } from './form';
import { ApesSplitModule } from './split';
import { ApesDividerModule } from './divider';
import { ApesPanelModule } from './panel';
import { ApesScrollPanelModule } from './scroll-panel';

/* 显示控件（display） */
import { ApesAvatarModule } from './avatar';
import { ApesBadgeModule } from './badge';
import { ApesPopoverModule } from './popover';
import { ApesToolTipModule } from './tooltip';
import { ApesListModule } from './list';
import { ApesCollapseModule } from './collapse';
import { ApesTagModule } from './tag';
import { ApesIframeModule } from './iframe';
import { ApesTransferModule } from './transfer';
import { ApesImagesModule } from '@shared/apes/images/apes-images.module';

/* 反馈控件（feedback） */
import { ApesAlertModule } from './alert';
import { ApesMessageModule } from './message';
import { ApesNoticeIconModule } from './notice-icon';
import { ApesPopConfirmModule } from './popconfirm';
import { ApesProgressModule } from './progress';
import { ApesSpinModule } from './spin';
import { ApesStatusBarModule } from './status-bar';
import { ApesNotificationModule, ApesNotificationService } from './notification';
import { ApesDrawerModule } from './drawer';

/* 导航控件（navigation） */
import { ApesAffixModule } from './affix';
import { ApesDropDownModule } from './dropdown';
import { ApesPaginationModule } from './pagination';
import { ApesReuseTabModule } from './reuse-tab';
import { ApesMenuModule } from './menu';
import { ApesSidebarNavModule } from './sidebar-nav';
import { ApesStepsModule } from './steps';
import { ApesSidebarMenuModule } from './sidebar-menu';
import { ApesBreadcrumbModule } from './breadcrumb';

/* 报表控件 */
import { ApesLoopTableComponent } from './report/apes-loop-table.component';
import { ApesTableModule } from './table';

/*打印*/
import { ApesLodopModule } from './lodop';
import { ApesXlsxModule } from './xlsx';
import { NgSelectConfig } from '@shared/apes/ng-select/config.service';

/*步骤条*/
import { StepsGuideComponent, StepsGuideModule } from '@shared/apes/steps-guide';


/*下钻跳转*/
import { ApesRelevancyLinkModule } from '@shared/apes/relevancy-link';

/*xlsx导入导出服务*/

// form/layout/display/feedback/navigation
export * from './input';
export * from './input-number';
export * from './radio';
export * from './checkbox';
export * from './auto-complete';
export * from './span';
export * from './upload';

export * from './grid';
export * from './form';

export * from './list';
export * from './avatar';
export * from './popover';
export * from './spin';
export * from './status-bar';
export * from './notice-icon';
export * from './message';
export * from './drawer';
export * from './exception';


@NgModule({
  declarations: [ApesLoopTableComponent],
  imports: [
    CommonModule,
    FormsModule,
    ApesSidebarNavModule.forRoot(),
    ApesHeaderModule.forRoot(),
    ApesLodopModule.forRoot(),
    ApesXlsxModule.forRoot(),
    ReactiveFormsModule,
    ApesSidebarMenuModule.forRoot(),
    ApesScrollPanelModule,
  ],
  entryComponents: [StepsGuideComponent],
  exports: [
    //form
    ApesAutoCompleteModule,
    ApesButtonModule,
    ApesCheckboxModule,
    ApesCityPickerModule,
    ApesInputModule,
    ApesInputNumberModule,
    NgSelectModule,
    ApesRadioModule,
    ApesTreeModule,
    TreeModule,
    ApesTreeSelectModule,
    ApesButtonListModule,
    ApesSpanModule,
    ApesDatePickerModule,
    ApesTimePickerModule,
    ApesUploadModule,
    ApesTimelineModule,
    ApesSelectModule,
    ApesSwitchModule,
    ApesWaveModule,
    ApesCustomCardModule,

    //layout
    ApesContainerModule,
    ApesCardModule,
    ApesGlobalFooterModule,
    ApesHeaderModule,
    ApesGridModule,
    ApesFormModule,
    ApesTabsModule,
    ApesPanelModule,
    ApesSplitModule,
    ApesContentModule,
    ApesDividerModule,
    ApesScrollPanelModule,
    ApesEmptyModule,
    ApesDescriptionsModule,

    //display
    ApesAvatarModule,
    ApesBadgeModule,
    ApesPopoverModule,
    ApesToolTipModule,
    ApesListModule,
    ApesTagModule,
    ApesCollapseModule,
    ApesIframeModule,
    ApesTransferModule,
    ApesIconModule,
    ApesImagesModule,

    //feedback
    ApesAlertModule,
    ApesMessageModule,
    ApesNoticeIconModule,
    ApesPopConfirmModule,
    ApesProgressModule,
    ApesSpinModule,
    ApesStatusBarModule,
    ApesNotificationModule,
    ApesDrawerModule,

    //navigation
    ApesAffixModule,
    ApesDropDownModule,
    ApesPaginationModule,
    ApesReuseTabModule,
    ApesMenuModule,
    ApesSidebarNavModule,
    ApesStepsModule,
    ApesSidebarMenuModule,
    ApesBreadcrumbModule,

    // charts
    ApesG2BarModule,
    ApesG2PieModule,
    ApesModalModule,
    ApesExceptionModule,
    ApesLoopTableComponent,
    ApesTableModule,
    ApesIconModule,

    // apes-charts
    ApesChartsModule,

    /*打印*/
    // ApesLodopModule,

    FormsModule,
    ReactiveFormsModule,
    StepsGuideModule,

    ApesRelevancyLinkModule,
  ],

})
export class ApesModule {
  static forRoot(): ModuleWithProviders {
    return {
      ngModule: ApesModule,
      providers: [{
        provide: NgSelectConfig,
        useValue: {
          notFoundText: '无符合条件的记录',
        },
      },
        ApesNotificationService,
      ],
    };
  }
}
